
#include <stdio.h>

int main()
{
	FILE *fin, *fout;
	int i, j;
    int data;
	int table[8] = {1, 2, 4, 8, 16, 32, 64, 128};

	fin = fopen("tmp.txt", "r");
	fout = fopen("ll.bin", "wb");
	
	while (!feof(fin)) {
		for (i = 0; i < 10; ++i) {
			data = 0;
			for (j = 0; j < 8; ++j) {
				if (fgetc(fin) == ' ') {
					data ^= table[j];
				}
			}
			fputc(data, fout);
		}
		data = fgetc(fin);
	}
	fclose(fin);
	fclose(fout);
	return 0;
}
